﻿@{
    Layout = null;
}

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="Wiki/List" method="post">
        <div class="bjui-searchBar">
            <label>关键字：</label><input type="text" id="SearchKeyWords" value="@ViewBag.SearchKeyWords" name="SearchKeyWords" class="form-control" size="15" placeholder="标题关键字">&nbsp;
            <input type="hidden" id="ArticleTypeId" name="ArticleTypeId" value="@ViewBag.ArticleTypeId" />
            <input type="text" name="ArticleTypeName" id="ArticleTypeName" value="@ViewBag.ArticleTypeName" readonly placeholder="选择类型" size="10" data-toggle="findgrid"
                   data-options="{
                        group: '',
                        include: 'ArticleTypeId:ArticleType_id,ArticleTypeName:ArticleType_name',
                        dialogOptions: {title:'选择类型'},
                        gridOptions: {
                            local: 'local',
                            dataUrl: 'Wiki/SearchType',
                            columns: [
                                {name:'ArticleType_id', label:'ID', width:100},
                                {name:'ArticleType_name', label:'类型'}
                            ]
                        }
                    }">
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询</a>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="true">
        <thead>
            <tr>
                <th align="center"></th>
                <th align="center">标题</th>
                <th align="center">类型</th>
                <th align="center">作者</th>
                <th align="center">上传时间</th>
            </tr>
        </thead>
        <tbody>
            @if (ViewBag.Modellist != null)
            {
                int i = Int32.Parse(ViewBag.PageSize) * (Int32.Parse(ViewBag.PageCurrent) - 1) + 1;
                foreach (var item in ViewBag.Modellist)
                {
                    <tr data-id="@i">
                        <td align="center">@i</td>
                        <td align="left"><a href="Wiki/Article/@item.Id" data-toggle="navtab" data-id="WikiArticle_@item.Id" data-title="@item.Article_name">@item.Article_name</a></td>
                        <td align="center">@item.ArticleType_name</td>
                        <td align="center">@item.User_name</td>
                        <td align="center">@item.Createtime.ToString("yyyy-MM-dd HH:mm") </td>
                    </tr>
                    i++;
                }
            }

        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="30">30</option>
                <option value="60">60</option>
                <option value="120">120</option>
                <option value="150">150</option>
            </select>
        </div>
        <span>&nbsp;条，共 @ViewBag.AllRecords 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="@ViewBag.AllRecords" data-page-size="30" data-page-current="1">
    </div>
</div>
